package org.mili.ticketeer.dto;

public class ContactRole implements Archivable {

    public static enum Fields implements Field {
        CONTACT,
        ROLE;
    }

    public static enum UniqueFields implements Field {
        CONTACT,
        ROLE;
    }

    public static final String TABLE = "contact_role";

    private int contact;
    private int role;

    public int getContact() {
        return contact;
    }

    public void setContact(int contact) {
        this.contact = contact;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ContactRole that = (ContactRole) o;

        if (contact != that.contact) return false;
        if (role != that.role) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = contact;
        result = 31 * result + role;
        return result;
    }

    @Override
    public String toString() {
        return "ContactRole{" +
                "contact=" + contact +
                ", role=" + role +
                '}';
    }
}
